home *** CD-ROM | disk | FTP | other *** search
- SMTPpost SMTPpost
-
-
- NAME
-
- SMTPpost - post a mail message using SMTP
-
-
- SYNOPSIS
-
- SMTPpost [-f fromuser] [-R userrealname] [-s subject] [-r]
- [-Q] [-S]
- [-raw] [-n] [-t to-addr] [-c cc-addr] [-b bcc-addr]
- [mailfile | addresses] <mailfile
-
-
- DESCRIPTION
-
- SMTPpost uses SMTP (per RFC-821) to post 'mailfile' to the
- addresses specified via the -t, -c and -b arguments. If none
- of -t, -c or -b are specified, the destination addresses are
- obtained from the headers in 'mailfile'.
-
- Whenever an address is required, a comma-separated set of
- addresses may be applied. If they are for the -t, -c or -b
- arguments, there may be *no* white-space in between the
- addresses.
-
- SMTPpost will attempt to open a TCP SMTP socket to each
- destination host. If that fails, SMTPpost will attempt to
- forward the mail to the SMTPSmarterHost (which is specified
- via a required configuration variable). If a socket cannot
- be opened, then SMTPpost will store the article in the
- SMTPSpoolDir (which is also specified via another required
- configuration variable) for processing later by SMTPd.
-
- The -Q argument tells SMTPpost to *not* try to send the
- message immediately. Instead, the article is queued into
- SMTPSpoolDir and SMTPd is expected to process the actual
- transmission of the message.
-
- The -S argument tells SMTPpost to *not* try to access the
- destination host at all. All messages will go directly to
- SMTPSmarterHost (or be queued if it isn't available or if
- the -Q argument is specified).
-
- For the cases where the destination address is the local
- host, SMTPpost also requires the SMTPMailDir configuration
- variable to be assigned, denoting the appropriate directory.
-
- If the delivery succeeds, SMTPpost will log that in the
- INetUtils logfile (INet:Logfile) and return a program value
- of zero.
-
- If the delivery fails, SMTPpost will log that as well, along
- with a description failure reason. SMTPpost will return a
- program value of thirty (30) in that case.
-
- "mailfile" may be specified on the command line, or as the
- standard input.
-
- If SMTPpost's program name starts with an 'r' (such as 'rsmtp')
- then SMTPpost assumes that all command line arguments are
- addresses that the mailfile (which *must* be on standard input)
- are to be delivered to. "mailfile" must be fully formed and
- complete. SMTPpost will not add a "Subject:", "From:" or an
- "Organization:" header in this case. This is called "receive
- mail" mode.
-
- Options:
-
- -b addrs : Specify an address to which a message is
- be sent (the Blind Carbon Copy header).
- The -b argument may be repeated any
- number of times. No BCC recipient is
- aware of any other BCC recipient.
-
- -c addrs : Specify an address which is to be added
- to the Carbon-Copy list (the CC: headers).
- The -c argument may be repeated any number
- of times.
-
- -f username : The username to be used in building a From
- header in the article. Note that if a From
- header already exists in the article, then
- SMTPpost will not create another one.
-
- -n : Do not queue. If the delivery to either the
- destination host and to SMTPSmarterHost
- fails, SMTPpost will normally queue the
- article in SMTPSpoolDir. Setting this
- option prevents that from happening (this
- is intended primarily for SMTPd).
-
- -Q : Queue the message, do not send immediately.
-
- -S : Do not attempt a connection to the destination
- host, route the message to SMTPSmarterHost.
-
- -r : Receive mail mode. All arguments after -r
- are treated as addresses that mailfile (which
- *must* be in standard input) is to be
- delivered to. See discussion above.
-
- -raw : Normally, if all of -f, -R and -s are not
- specified, SMTPpost will scan "mailfile"
- to obtain the missing headers. This option
- prevents that from occurring. Empty headers
- are created instead.
-
- -R realname : The real name of the user to be used in
- building a From header for the message.
-
- -s text : The subject of the message. "text" may
- be quoted (and in fact, must be if there
- is any whitespace in it).
-
- -t addrs : Specify a destination address for the message.
- This one is for the To: header. The -t
- argument may be repeated any number of times.
-
- DIAGNOSTICS
-
- Upon success, SMTPpost has a return status of zero.
-
- If the destination host was not available, and SMTPpost queued
- the message (or left it queued, when called from SMTPd); then
- SMTPpost has a return status of 5.
-
- Upon failure of any kind, SMTPpost prints a message to standard
- output, and has an exit status of 30. SMTPpost also prints the
- error message in INet:Logfile.
-
-
- NOTES
-
- SMTPpost duplicates the arguments used by the AmigaUUCP sendmail.
- It can be dropped-in as a replacement for that.
-
- SMTPpost has been tested with AmigaUUCP, GRn, and BBX.
-
- If SMTPpost must generate a From header, it requires that USERNAME,
- HOSTNAME (or NODENAME) and DOMAINNAME be defined either as environment
- variables, or in UULib:Config.
-
- SMTPpost will attempt to run a command named by the MAILREADYCMD
- environment variable when delivering local mail. The format of the
- command is:
-
- MAILREADYCMD -x T:MailRdy
-
- SMTPpost will also send a signal to a public message port named
- "T:MailRdy" if it is on the system public list.
-
- BUGS/TODO
-
- SMTPpost doesn't accept full RFC-822 addresses.
-
- The alias implementation is severely broken.
-